﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace CharacterInc
{
	public class WordStruct
	{
		public void RemoveSame()
		{
			int num = this.Charact.Count;
			for (int i = 0; i < num; i++)
			{
				if (this.Charact[i] == '-')
				{
					this.SeparatorIndex = i;
					while (this.SeparatorIndex < num - 1 && this.Charact[this.SeparatorIndex + 1] == '-')
					{
						this.Charact.RemoveAt(this.SeparatorIndex);
						this.IsChange.RemoveAt(this.SeparatorIndex);
						this.RemoveNum++;
						num--;
					}
				}
			}
		}

		public double SignedDistanceTo(Plane plane, XYZ p)
		{
			XYZ xyz = p - plane.Origin;
			return plane.Normal.DotProduct(xyz);
		}

		public XYZ ProjectOnto(Plane plane, XYZ p)
		{
			double num = this.SignedDistanceTo(plane, p);
			return p + num * plane.Normal;
		}

		public UV ProjectInto(Plane plane, XYZ p)
		{
			XYZ xyz = this.ProjectOnto(plane, p);
			XYZ origin = plane.Origin;
			XYZ xyz2 = xyz - origin;
			double num = xyz2.DotProduct(plane.XVec);
			double num2 = xyz2.DotProduct(plane.YVec);
			return new UV(num, num2);
		}

		public bool ch;

		public List<char> Charact = new List<char>();

		public List<bool> IsChange = new List<bool>();

		public char[] AllChsNum = new char[]
		{
			'零',
			'一',
			'二',
			'三',
			'四',
			'五',
			'六',
			'七',
			'八',
			'九',
			'十',
			'百',
			'千',
			'万',
			'壹',
			'贰',
			'叁',
			'肆',
			'伍',
			'陆',
			'柒',
			'捌',
			'玖',
			'拾',
			'佰',
			'仟'
		};

		public char[] ChsNumNoUnit = new char[]
		{
			'零',
			'一',
			'二',
			'三',
			'四',
			'五',
			'六',
			'七',
			'八',
			'九',
			'壹',
			'贰',
			'叁',
			'肆',
			'伍',
			'陆',
			'柒',
			'捌',
			'玖'
		};

		public char[] LowerChsNum = new char[]
		{
			'零',
			'一',
			'二',
			'三',
			'四',
			'五',
			'六',
			'七',
			'八',
			'九',
			'十',
			'百',
			'千',
			'万'
		};

		public char[] UpperChsNum = new char[]
		{
			'零',
			'壹',
			'贰',
			'叁',
			'肆',
			'伍',
			'陆',
			'柒',
			'捌',
			'玖',
			'拾',
			'佰',
			'仟',
			'万'
		};

		public char[] RomeNum = new char[]
		{
			'Ⅰ',
			'Ⅱ',
			'Ⅲ',
			'Ⅳ',
			'Ⅴ',
			'Ⅵ',
			'Ⅶ',
			'Ⅷ',
			'Ⅸ',
			'Ⅹ',
			'Ⅺ',
			'Ⅻ'
		};

		private List<char> NewList = new List<char>();

		public int RemoveNum;

		public int SeparatorIndex;

		public int zeroIndex;

		public bool blZero;

		public string zerostr;
	}
}
